<#-- @ftlvariable name="categories" type="java.util.List<model.Category>" -->
<!doctype html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <script src="/scripts/jquery.min.js"></script>
    <script src="/scripts/semantic.min.js"></script>
    <link rel="stylesheet" href="/styles/semantic.min.css">
    <title>Document</title>
    <style>
        /*ul li {
            display: inline;
        }*/
        footer {
            margin-top: 25px;
            position: fixed;
            bottom: 0;
            width: 100%;

        }
    </style>
    <title><@block name="title"></@block></title>
</head>
<body>
<div class="ui inverted menu">

    <a href="/" class="active item">主页</a>
<#list categories as category>
    <a href="/category/${category.id}" class="item">${category.name!""}</a>
</#list>
    <div class="right menu">
    <#--表示登陆了-->
    <#if (session.user)??>
        <a href="${base}/user/modify" class="item">个人信息</a>
        <a href="${base}/topic/pub" class="item">发布帖子</a>
        <a href="/logout" class="item">退出</a>
    <#else>
    <#--表示未登陆-->
        <a href="/register" class="item">注册</a>
        <a href="/login" class="item">登录 </a>
    </#if>
    </div>
</div>

    <@block name="content">
        <h2>aaaaaaaa</h2>
    </@block>
    </div>

    <footer>
        <p style="text-align: center;background: gray;">宁夏大学信息工程学院 12015242012 姚颢栋 &copy; 2018-2020</p>
    </footer>
</div>

</body>
<@block name="additional">
<script>
    $('.dropdown').dropdown();
    $('#sidebar-icon').click(function () {
        $('.sidebar.menu').sidebar('toggle');
    });
</script>
</@block>
</html>